package com.nebula.gateway;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.zuul.EnableZuulProxy;

/**
 * @Author: WangZhongLiang
 * @Date: 2019/9/2
 */
@SpringBootApplication
@EnableDiscoveryClient
@EnableZuulProxy
public class NeGateway extends SpringBootServletInitializer {
    public static void main(String[] args) {
        SpringApplication.run(NeGateway.class,args);
    }

    /**
     *  为了打包springboot项目
     * @param builder
     * @return
     */
    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        return builder.sources(this.getClass());
    }

}

